"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const taro_1 = require("@tarojs/taro");
const components_1 = require("@tarojs/components");
const prop_types_1 = require("prop-types");
require("./index.scss");
// https://ninghao.net/files/styles/course_cover/public/showcase/flutter-bloc-showcase.jpg?itok=706zNDkY
class XList extends taro_1.Component {
    render() {
        const { title, figcaption, image, isList } = this.props;
        return (<components_1.View className='list'>
                {isList
            ?
                <components_1.View className='header'>
                            <components_1.View className='title'>
                                <components_1.View className='icon'/>
                                <components_1.Text>{title}</components_1.Text>
                            </components_1.View>
                        </components_1.View>
            :
                <components_1.View className='item'>
                            <components_1.Text>赞助商</components_1.Text>
                            <components_1.Text>H5工坊</components_1.Text>
                        </components_1.View>}
                {isList
            &&
                <components_1.View className='figure'>
                        {figcaption && <components_1.Text className='figcaption'>{figcaption}</components_1.Text>}
                        {image && <components_1.Image src={image} className='image' mode='widthFix'/>}
                    </components_1.View>}
            </components_1.View>);
    }
}
XList.propTypes = {
    data: prop_types_1.default.array,
    title: prop_types_1.default.string,
    isList: prop_types_1.default.string,
};
XList.defaultProps = {
    data: [],
    title: '',
    isList: true
};
exports.default = XList;
//# sourceMappingURL=index.bak.jsx.map